/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.simba.coherence;

import java.util.Set;

/**
 * Interface for coherence matrix. In general, we would assume it to be sparse
 * but just for the sake of flexibility and having ensured norming, this interface
 * was required. Note that the matrix is not required to be symmetric
 * @author ngonga
 */
public interface CoherenceMatrix { 
    /** Implements adding an entry to the matrix (order is row, column, value)
     * 
     * @param uri1 Row
     * @param uri2 Column
     * @param coherence value
     */
    public void setCoherence(String uri1, String uri2, double coherence);
    
    /** Implements getting a similarity value from an existing matrix
     * 
     * @param uri1 Row
     * @param uri2 Column
     * @return Coherence value between the two Uris
     */
    public double getCoherence(String uri1, String uri2);
    
    /** Norms the rows of the matrix and ensure that the sum of entries in a
     * given row is exactly 1. Note that norming can be carried out in different
     * ways, but in general it is simply done by dividing all entries by the sum
     * of the entries.
     */
    public void normRows();
    
    public Set getColumns();
    public Set getRows();
}
